
/* 显示第几页 */
function showPage(current, pages) {
    console.log("---call showPage - " + current);
    if(current >= 1 || current <= pages){
        /* 合法的页面值，开始封装查询条件 */
        var queryBean = {};
        var gameTask = {};
        gameTask.devNr = $("input[name = 'devNr']").val();
        if(gameTask.devNr === ''){
            gameTask.devNr = null;
        }
        queryBean.gameTask = gameTask;
        queryBean.devNrEnd = $("input[name = 'devNrEnd']").val();
        if(queryBean.devNrEnd === ''){
            queryBean.devNrEnd = null;
        }
        queryBean.rule = $("input[name = 'rule']").val();
        if(queryBean.rule === ''){
            queryBean.rule = null;
        }
        /* 什么游戏 */
        queryBean.gameName = $('#game_name_select').val();
        /* 发起调用 */
        userdataManView(current, queryBean);
    }
}

/* 删除一条设备信息 */
function userdataRemove(id) {
    console.log("---call userdataRemove");
    // 询问用户确认
    var b = confirm("数据无价，你想好了？");
    if(b){
        /* 发起调用 */
        call(null, source, TYPE_REMOVE, YS_VIEW, id + "", USERDATA_TASK, token);
    }

    return false;
}

/* 根据游戏名称查看游戏 */
function gameNameSearch() {
    console.log("---call gameNameSearch - ");
    var queryBean = {};
    queryBean.gameName = $('#game_name_select').val();
    /* 发起调用 */
    userdataManView(1, queryBean);
}

/* 将结果导出到Execl文件中 */
function exportExcelFile(current, pages) {
    console.log("---call exportExcelFile");
    // 询问用户确认
    var b = confirm("是否导出本页结果并下载Excel表格文件？");
    if(b){
        /* 发起调用 */
        call(null, source, TYPE_DOWNLOAD, YS_VIEW, "", USERDATA_TASK, token);
    }

    return false;
}

